Thanks for the reply!
I don't think UIBinder is quite what I'm looking for. The XML has to
validate against a RelaxNG definition. Also, after a lab gets parsed
into a structure, it gets stored in a database, and uses that data to
create the views. The data also gets used in other ways than just UI.
I can't seem to get your other suggestion working, if I understood
correctly. Here is my attempt assuming I want a button wrapped in a
<b> tag.
public class MyButton extends Button {
private final Element e = (Element)
Document.get().createElement("b");
public MyButton(String name) {
super(name);
}
@Override
public Element getElement() {
return e;
}
}
Then add it,
MyButton button = new MyButton("Run");
RootPanel.get("myButtonContainer").add(button);
And it produces
<b tabindex="0"></b>
A normal button produces
<button type="button" class="gwt-Button">Run</button>
I also tried the approach from
http://osdir.com/ml/GoogleWebToolkit/2009-05/msg01379.html
with no luck, although same concept.
Thanks,
Tom